package com.toggery.POS.dao;

import com.toggery.POS.entity.Bill;
import com.toggery.POS.entity.BillExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface BillMapper {
    long countByExample(BillExample example);

    int deleteByExample(BillExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Bill record);

    int insertSelective(Bill record);

    List<Bill> selectByExample(BillExample example);

    Bill selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Bill record, @Param("example") BillExample example);

    int updateByExample(@Param("record") Bill record, @Param("example") BillExample example);

    int updateByPrimaryKeySelective(Bill record);

    int updateByPrimaryKey(Bill record);
    @Select({
            "select * from bill"
    })
    List<Bill> findAll();

    @Select({
            "select * from bill where orderId=#{orderId,jdbcType=INTEGER}"
    })
    Bill findAllWithOrderId(int orderId);
}